<template>
	<view class="">
		
		<view class="inv-con">
			<jyf-parser :html="content"></jyf-parser>
		</view>
		<view class="footer-btn">
			<view class="btn" hover-class="hover-opacity" @tap="redirect">
				同意，继续购买
			</view>
		</view>
		<mix-loading v-if="isLoading"></mix-loading>
	</view>
</template>

<script>
	import jyfParser from "@/components/jyf-parser/jyf-parser.vue"
	export default {
		components:{
			jyfParser
		},
		data(){
			return{
				content:""
			}
		},
		onLoad() {
			this.loadData();
		},
		methods:{
			redirect(){
				uni.redirectTo({
					url:'/pages/order/creatOrder'
				})
			},
			async loadData(){
				const res=await this.$request('content/buy',{},{showLoading:true});
				if(res.result==0){
					this.content=res.data.notice;
				}else{
					this.$util.msg(res.resultNote);
				}
			}
		}
	}
</script>

<style scoped>
	.inv-con{
		padding: 20upx 20upx 180upx 20upx;
	}
	.footer-btn{
		position: fixed;
		bottom:0;
		background: #FFFFFF;
		width: 100%;
		padding-bottom: var(--status-bar-height);
	}
	.btn{
		margin:10upx auto;
		width:700upx;
		height: 88upx;
		text-align: center;
		line-height: 88upx;
		background: #BEC3CF;
		border-radius: 44upx;
		font-size: 30upx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #FFFFFF;
	}
</style>
